﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Linq;

using Microsoft.Templates.Core.Gen;

namespace Microsoft.Templates.Core.PostActions.Catalog
{
    public class ChangeSolutionConfigurationPostAction : PostAction
    {
        internal override void ExecuteInternal()
        {
            if (GenContext.Current.ProjectInfo.ProjectConfigurations.Any())
            {
                GenContext.ToolBox.Shell.Solution.ChangeSolutionConfiguration(GenContext.Current.ProjectInfo.ProjectConfigurations);
            }
        }
    }
}
